home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / rcs4 / doc / co.man < prev    next >
Encoding:
Text File  |  1990-08-18  |  12.4 KB  |  397 lines

  1.  
  2.  
  3.  
  4.      CO(1L)             Purdue University            CO(1L)
  5.  
  6.  
  7.  
  8.      NAME
  9.       co - check out RCS revisions
  10.  
  11.      SYNOPSIS
  12.       co [ options ] file ...
  13.  
  14.      DESCRIPTION
  15.       Co retrieves a revision from each RCS    file and stores    it
  16.       into the corresponding working file.    Each file name ending
  17.       in `,v' is taken to be an RCS    file; all other    files are
  18.       assumed to be    working    files.    If only    a working file is
  19.       given, co tries to find the corresponding RCS    file in    the
  20.       directory ./RCS and then in the current directory.  For more
  21.       details, see the file    naming section below.
  22.  
  23.       Revisions of an RCS file may be checked out locked or
  24.       unlocked. Locking a revision prevents    overlapping updates. A
  25.       revision checked out for reading or processing (e.g.,
  26.       compiling) need not be locked. A revision checked out    for
  27.       editing and later checkin must normally be locked. Co    with
  28.       locking fails    if the revision    to be checked out is currently
  29.       locked by another user.  (A lock may be broken with the
  30.       rcs(1L) command.) Co with locking also requires the caller
  31.       to be    on the access list of the RCS file, unless he is the
  32.       owner    of the file or the superuser, or the access list is
  33.       empty.  Co without locking is    not subject to accesslist
  34.       restrictions,    and is not affected by the presence of locks.
  35.  
  36.       A revision is    selected by options for    revision or branch
  37.       number, checkin date/time, author, or    state.    When the
  38.       selection options are    applied    in combination,    co retrieves
  39.       the latest revision that satisfies all of them.  If none of
  40.       the selection    options    is specified, co retrieves the latest
  41.       revision on the default branch (normally the trunk, see the
  42.       -b option of rcs(1L)).  A revision or    branch number may be
  43.       attached to any of the options -f, -l, -p, -q, -r, or    -u.
  44.       The options -d (date), -s (state), and -w (author) retrieve
  45.       from a single    branch,    the selected branch, which is either
  46.       specified by one of -f,..., -u, or the default branch.
  47.  
  48.       A co command applied to an RCS file with no revisions
  49.       creates a zero-length    working    file.  Co always performs
  50.       keyword substitution (see below).
  51.  
  52.       -r[rev]    retrieves the latest revision whose number    is
  53.              less than or equal    to rev.     If rev    indicates a
  54.              branch rather than    a revision, the    latest
  55.              revision on that branch is    retrieved.  If rev is
  56.              omitted, the latest revision on the default
  57.              branch (see the -b    option of rcs(1L)) is
  58.              retrieved.     Rev is    composed of one    or more
  59.              numeric or    symbolic fields    separated by `.'. The
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 8/18/90)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      CO(1L)             Purdue University            CO(1L)
  71.  
  72.  
  73.  
  74.              numeric equivalent    of a symbolic field is
  75.              specified with the    -n option of the commands
  76.              ci(1L) and    rcs(1L).
  77.  
  78.       -l[rev]    same as -r, except    that it    also locks the
  79.              retrieved revision    for the    caller.     See option -r
  80.              for handling of the revision number rev .
  81.  
  82.       -u[rev]    same as -r, except    that it    unlocks    the retrieved
  83.              revision (if it was locked    by the caller).    If rev
  84.              is    omitted, -u retrieves the latest revision
  85.              locked by the caller; if no such lock exists, it
  86.              retrieves the latest revision on the default
  87.              branch.
  88.  
  89.       -f[rev]    forces the    overwriting of the working file;
  90.              useful in connection with -q.  See    also the
  91.              section on    file modes below.
  92.  
  93.       -p[rev]    prints the    retrieved revision on the standard
  94.              output rather than    storing    it in the working
  95.              file.  This option    is useful when co is part of a
  96.              pipe.
  97.  
  98.       -q[rev]    quiet mode; diagnostics are not printed.
  99.  
  100.       -ddate     retrieves the latest revision on the selected
  101.              branch whose checkin date/time is less than or
  102.              equal to date.  The date and time may be given in
  103.              free format and are converted to local time.
  104.              Examples of formats for date:
  105.  
  106.              22-April-1982, 17:20-CDT,
  107.              2:25 AM, Dec. 29, 1983,
  108.              Tue-PDT, 1981, 4pm    Jul 21           (free format),
  109.              Fri, April    16 15:52:25 EST    1982 (output of    ctime).
  110.  
  111.              Most fields in the    date and time may be
  112.              defaulted.     Co determines the defaults in the
  113.              order year, month,    day, hour, minute, and second
  114.              (most to least significant). At least one of
  115.              these fields must be provided. For    omitted    fields
  116.              that are of higher    significance than the highest
  117.              provided field, the current values    are assumed.
  118.              For all other omitted fields, the lowest possible
  119.              values are    assumed.  For example, the date    "20,
  120.              10:30" defaults to    10:30:00 of the    20th of    the
  121.              current month and current year.  The date/time
  122.              must be quoted if it contains spaces.
  123.  
  124.       -sstate    retrieves the latest revision on the selected
  125.              branch whose state    is set to state.
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 8/18/90)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      CO(1L)             Purdue University            CO(1L)
  137.  
  138.  
  139.  
  140.       -w[login]  retrieves the latest revision on the selected
  141.              branch which was checked in by the    user with
  142.              login name    login. If the argument login is
  143.              omitted, the caller's login is assumed.
  144.  
  145.       -jjoinlist generates a new revision which is the join    of the
  146.              revisions on joinlist.  Joinlist is a comma-
  147.              separated list of pairs of    the form rev2:rev3,
  148.              where rev2    and rev3 are (symbolic or numeric)
  149.              revision numbers.    For the    initial    such pair,
  150.              rev1 denotes the revision selected    by the above
  151.              options -r, ..., -w. For all other    pairs, rev1
  152.              denotes the revision generated by the previous
  153.              pair. (Thus, the output of    one join becomes the
  154.              input to the next.)
  155.  
  156.              For each pair, co joins revisions rev1 and    rev3
  157.              with respect to rev2.  This means that all
  158.              changes that transform rev2 into rev1 are applied
  159.              to    a copy of rev3.     This is particularly useful
  160.              if    rev1 and rev3 are the ends of two branches
  161.              that have rev2 as a common    ancestor. If rev1 <
  162.              rev2 < rev3 on the    same branch, joining generates
  163.              a new revision which is like rev3,    but with all
  164.              changes that lead from rev1 to rev2 undone.  If
  165.              changes from rev2 to rev1 overlap with changes
  166.              from rev2 to rev3,    co prints a warning and
  167.              includes the overlapping sections,    delimited by
  168.              the lines <<<<<<< rev1, =======, and
  169.              >>>>>>> rev3.
  170.  
  171.              For the initial pair, rev2    may be omitted.    The
  172.              default is    the common ancestor.  If any of    the
  173.              arguments indicate    branches, the latest revisions
  174.              on    those branches are assumed.  The options -l
  175.              and -u lock or unlock rev1.
  176.  
  177.      KEYWORD SUBSTITUTION
  178.       Strings of the form $keyword$    and $keyword:...$ embedded in
  179.       the text are replaced    with strings of    the form
  180.       $keyword: value $, where keyword and value are pairs listed
  181.       below.  Keywords may be embedded in literal strings or
  182.       comments to identify a revision.
  183.  
  184.       Initially, the user enters strings of    the form $keyword$.
  185.       On checkout, co replaces these strings with strings of the
  186.       form $keyword: value $. If a revision    containing strings of
  187.       the latter form is checked back in, the value    fields will be
  188.       replaced during the next checkout.  Thus, the    keyword    values
  189.       are automatically updated on checkout.
  190.  
  191.       Keywords and their corresponding values:
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 8/18/90)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      CO(1L)             Purdue University            CO(1L)
  203.  
  204.  
  205.  
  206.       $Author$     The login name of the user who checked in the
  207.                revision.
  208.  
  209.       $Date$       The date    and time the revision was checked in.
  210.  
  211.       $Header$     A standard header containing the    full pathname
  212.                of the RCS file,    the revision number, the date,
  213.                the author, the state, and the locker (if
  214.                locked).
  215.  
  216.       $Id$           Same as $Header$, except    that the RCS file name
  217.                is without a path.
  218.  
  219.       $Locker$     The login name of the user who locked the
  220.                revision    (empty if not locked).
  221.  
  222.       $Log$           The log message supplied    during checkin,
  223.                preceded    by a header containing the RCS file
  224.                name, the revision number, the author, and the
  225.                date.  Existing log messages are    NOT replaced.
  226.                Instead,    the new    log message is inserted    after
  227.                $Log:...$.  This    is useful for accumulating a
  228.                complete    change log in a    source file.
  229.  
  230.       $RCSfile$    The name    of the RCS file    without    path.
  231.  
  232.       $Revision$   The revision number assigned to the revision.
  233.  
  234.       $Source$     The full    pathname of the    RCS file.
  235.  
  236.       $State$      The state assigned to the revision with the -s
  237.                option of rcs(1L) or ci(1L).
  238.  
  239.       Pairs    of RCS files and working files may be specified    in 3
  240.       ways (see also the example section).
  241.  
  242.       1) Both the RCS file and the working file are    given. The RCS
  243.       file name is of the form path1/workfile,v and    the working
  244.       file name is of the form path2/workfile, where path1/    and
  245.       path2/ are (possibly different or empty) paths and workfile
  246.       is a file name.
  247.  
  248.       2) Only the RCS file is given. Then the working file is
  249.       created in the current directory and its name    is derived
  250.       from the name    of the RCS file    by removing path1/ and the
  251.       suffix ,v.
  252.  
  253.       3) Only the working file is given.  Then co looks for    an RCS
  254.       file of the form path2/RCS/workfile,v    or path2/workfile,v
  255.       (in this order).
  256.  
  257.       If the RCS file is specified without a path in 1) and    2),
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 8/18/90)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      CO(1L)             Purdue University            CO(1L)
  269.  
  270.  
  271.  
  272.       then co looks    for the    RCS file first in the directory    ./RCS
  273.       and then in the current directory.
  274.  
  275.      EXAMPLES
  276.       Suppose the current directory    contains a subdirectory    `RCS'
  277.       with an RCS file `io.c,v'. Then all of the following
  278.       commands retrieve the    latest revision    from `RCS/io.c,v' and
  279.       store    it into    `io.c'.
  280.  
  281.            co  io.c;    co    RCS/io.c,v;   co  io.c,v;
  282.            co  io.c     RCS/io.c,v;    co  io.c  io.c,v;
  283.            co  RCS/io.c,v  io.c;    co  io.c,v  io.c;
  284.  
  285.      FILE MODES
  286.       The working file inherits the    read and execute permissions
  287.       from the RCS file. In    addition, the owner write permission
  288.       is turned on,    unless the file    is checked out unlocked    and
  289.       locking is set to strict (see    rcs(1L)).
  290.  
  291.       If a file with the name of the working file exists already
  292.       and has write    permission, co aborts the checkout if -q is
  293.       given, or asks whether to abort if -q    is not given. If the
  294.       existing working file    is not writable    or -f is given,    the
  295.       working file is deleted without asking.
  296.  
  297.      FILES
  298.       The caller of    the command must have write permission in the
  299.       working directory, read permission for the RCS file, and
  300.       either read permission (for reading) or read/write
  301.       permission (for locking) in the directory which contains the
  302.       RCS file.
  303.  
  304.       A number of temporary    files are created.  A semaphore    file
  305.       is created in    the directory of the RCS file to prevent
  306.       simultaneous update.
  307.  
  308.      DIAGNOSTICS
  309.       The RCS file name, the working file name, and    the revision
  310.       number retrieved are written to the diagnostic output.  The
  311.       exit status always refers to the last    file checked out, and
  312.       is 0 if the operation    was successful,    1 otherwise.
  313.  
  314.      IDENTIFICATION
  315.       Author: Walter F. Tichy, Purdue University, West Lafayette,
  316.       IN, 47907.
  317.       Revision Number: 1.4 ; Release Date: 89/05/02    .
  318.       Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  319.  
  320.      SEE ALSO
  321.       ci(1L), ident(1L), rcs(1L), rcsdiff(1L), rcsintro(1L),
  322.       rcsmerge(1L),    rlog(1L), rcsfile(5L)
  323.       Walter F. Tichy, "Design, Implementation, and    Evaluation of
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 8/18/90)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      CO(1L)             Purdue University            CO(1L)
  335.  
  336.  
  337.  
  338.       a Revision Control System," in Proceedings of    the 6th
  339.       International    Conference on Software Engineering, IEEE,
  340.       Tokyo, Sept. 1982.
  341.  
  342.      LIMITATIONS
  343.       The option -d    gets confused in some circumstances, and
  344.       accepts no date before 1970.    Links to the RCS and working
  345.       files    are not    preserved.  There is no    way to suppress    the
  346.       expansion of keywords, except    by writing them    differently.
  347.       In nroff and troff, this is done by embedding    the null-
  348.       character `\&' into the keyword.
  349.  
  350.      BUGS
  351.       The option -j    does not work for files    that contain lines
  352.       with a single    `.'.
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      Page 6                         (printed 8/18/90)
  394.  
  395.  
  396.  
  397.